package com.suoluo.zenadmin.vo;

import java.util.ArrayList;
import java.util.List;

import org.springframework.web.multipart.MultipartFile;

public class BaseInfoVO extends ImageVO implements BaseInfoMetadata{

	private String zhname;
	private String enname;
	private String content;
	
	private int infoType;
	private int dataId;
	private int defaultInfo;
	
	private MultipartFile[] imageFiles;
	
	private List<ImageVO> images;
	
	@Override
	public String getZhname() {
		return this.zhname;
	}

	@Override
	public void setZhname(String zhname) {
		this.zhname = zhname;
	}

	@Override
	public String getEnname() {
		return this.enname;
	}

	@Override
	public void setEnname(String enname) {
		this.enname = enname;
	}

	@Override
	public String getContent() {
		return this.content;
	}

	@Override
	public void setContent(String content) {
		this.content = content;
	}

	@Override
	public int getInfoType() {
		return this.infoType;
	}

	@Override
	public void setInfoType(int infoType) {
		this.infoType = infoType;
	}

	@Override
	public int getDataId() {
		return this.dataId;
	}

	@Override
	public void setDataId(int dataId) {
		this.dataId = dataId;
	}

	@Override
	public int getDefaultInfo() {
		return this.defaultInfo;
	}

	@Override
	public void setDefaultInfo(int defaultInfo) {
		this.defaultInfo = defaultInfo;
	}

	public MultipartFile[] getImageFiles() {
		return imageFiles;
	}

	public void setImageFiles(MultipartFile[] imageFiles) {
		this.imageFiles = imageFiles;
	}

	public List<ImageVO> getImages() {
		return images;
	}

	public void setImages(List<ImageVO> images) {
		this.images = images;
	}
	
	public void addImage(ImageVO image){
		if (images == null){
			images = new ArrayList<ImageVO>();
		}
		images.add(image);
	}
}
